package com.atguigu.guli.ai.test1;

public class PhoneFactory {
    public Phone createPhone(String type){
        if(type.equalsIgnoreCase("xiaomi")){
            return new XiaomiPhone();
        }
        else if(type.equalsIgnoreCase("huawei")){
            return new HuaweiPhone();
        }
        return new Phone();
    }
}
